#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int u = 1;
	int j = 1;
	int s = 1; 
	int sum = 30;
	int count = 0;
	for (u = 1; u <= 9; u++)
	{
		for (j= 18; j >=2 ; j--)
		{
			s= sum - u - j;
			if (3*u + 2*j + s == 50)
			{
				count++;
			}
		}
	}
	printf("%d", count);
	return 0;
}